<% include header.ejs %>
<!--用户登录后的首页-->
<!--文章部分-->

<div class="content">
    <div id="aa" style="clear: both;float: left;margin-bottom: 50px">
       <ul class="list-group" style="list-style: none;margin-top: 80px">
           <!--此处最好添加有无文章的判断-->

           <h3 style="margin-bottom: 0px">最近发表的日记</h3><br/>
          <li id="artic">
              <% if(posts){ %>
              <% posts.forEach(function(post,index){%>
              <!--onerror 事件会在文档或图像加载过程中发生错误时被触发。-->
              <img src="./img/<%=  user.pictureurl %>" alt="个人头像" id="picture" onerror="this.src='./img/05.jpg'">
              <div class="times" style="color: dimgrey;">时间:<%= post.time %></div>
              <div class="article"><%= post.post %></div>
              <% }) %>
              <% } %>
         </li>
           <% include paging.ejs %>
        </ul>
    </div>
    <div style="height: 500px;width: 36%;float: right;margin-top: 100px;margin-bottom: 50px">
        <div id="calendar" style="float: right"></div>
        <div style="padding-left: 15px">
            <span style="font-size: 14px;color: dimgrey">关注吾志微信账号，用微信写日记</span>
            <br/>
            <img src="./img/weixin.jpg" style="width: 200px;height: 200px"/>
         </div>
     </div>
</div>
<% include footer.ejs %>
<!--引入日历的js文件-->
<script src="./libs/calendar.js"></script>
